CONCEPT OF OPERATION

3DEM can  render 3D terrain scenes and MPEG flyby animations from the following data sources:

USGS Digital Elevation Model (DEM) files,

USGS Spatial Data Transfer Standard (SDTS DEM) files,

USGS Global 30 Arc Second Elevation Data Set (GTOPO30 DEM) files

NOAA Global Land One-km Base Elevation (GLOBE) files

NASA Mars Digital Topographic Map (DTM) files

Any topographic data file organized by rows and columns of elevation data

Internally generated Mandelbrot fractals

3DEM uses the SGI/Microsoft OpenGL libraries for high speed 3D rendering.  3DEM will render 16 or 24 bit color three-dimensional projections, red-blue projections requiring red-blue 3D glasses for viewing, or color 3D projections requiring Liquid Crystal  Shutter (LCS) electronic shutter glasses for viewing.  3DEM scenes can be saved in the following formats.

Windows Bitmap (*.bmp, *.dib)

Joint Photograhic Experts Group  (*.jpg,, *.jpeg)

Zsoft Paintbrush (*.pcx)

Portable Network Graphics (*.png)

Portable Image  (*.pnm, *.ppm, *.pgm)

Sun Raster Image (*.ras. *.sun)

Silicon Graphics RGB (*.rgb, *.rgba, *.bw, *.sgi)

Truevision Targa (*.tga)

Tagged Image File (*.tif, *.tiff)

X-Pixmap (*.xpm)

Flyby animation AVI (*.avi)

Flyby animation MPEG (*.mpg, *.mpeg)

VRML world (*.wrl)

Binary terrain matrix (*.bin)

Terragen terrain (*.ter)

Maps, three-dimensional terrain images and animations, and GPS waypoints and routes produced by the 3DEM computer program are for general visualization purposes only.  3DEM is not intended for precise backcountry navigation, GPS referencing, mountaineering, or other specialized uses requiring high positional accuracy.   No warranty is expressed or implied regarding the use or the results of the use of the 3DEM computer programs in terms of correctness, accuracy, reliability, currency, fitness for a particular purpose, or otherwise. The user assumes the entire risk as to the results and performance of the 3DEM computer program.


EQUIPMENT AND SOFTWARE REQUIRED

The demonstration version of 3DEM is download from http://www.microtop.com as a zip-compressed file named 3dem80.zip.  Install 3DEM by extracting the contents of this compressed file to into a directory on your hard drive.

3DEM is designed to run under Win95/98 or WinNT 4.0 with 24 bit color graphics.  A 400 MHz Pentium or better microprocessor and fast graphics card are recommended.

A minimum of 128  MBytes of memory is also required.  Less than 128 MBytes of memory will limit the usefulness of the high-resolution modes of OpenGL rendering.

 For Win95 you will need the Microsoft OpenGL dynamic link libraries (opengl32.dll and glu32.dll) These file can also be downloaded from the 3DEM home page at http://www.microtopo.com.  Opengl32.dll and glu32.dll should reside in your Windows/System directory.

3DEM will display GPS waypoints, routes, and tracks on both the 2D overhead view and the 3D projection generated from a Digital Elevation Model.  This will allow you to view the track of any journey across a high resolution 3D image of the terrain.  GPS data can be read directly from Garmin and Magellan handheld GPS receivers via a serial data connection to your computer.  Waypoint text files can also be read and displayed.


 REGISTRATION

The demonstration version of 3DEM allows you to load and view OpenGL 3D projections and flybys of Digital Elevation Model (DEM) terrain.  Registration will remove the text, “3dem80 Demonstration,” which is added to all images produced by the demonstration version.

Registration is accomplished by entering a User Name and User Key in the registration dialog box that appears when the program is started.  Once registered, a user may download frequent program updates at no charge and is entitled to email technical support.

A User Key, matched to User Name, can be obtained online from the 3DEM web page at http://www.microtopo.com.  Choose “Copy Registration URL” to copy this web address to the clipboard.  Then paste this URL into your web browser address entry box to take you directly to the 3DEM web page.

CONTACTING THE AUTHOR

Programs are only improved by the incorporation of new ideas.  Your ideas are welcome.  Please report any bugs or send any questions, comments, or ideas to Richard Horne at rshorne@mnsinc.com, or visit the 3DEM web page at http://www.microtopo.com for the latest program update.


CHANGES IN VERSION 7
CHANGES IN VERSIONS 7 and 8

The major changes in Version 8 are described below

•	3DEM will now merge multiple DEMs to provide high-resolution maps and 3D projections of large surface areas, limited only by the computer’s memory.

•	3DEM now shows geographic coordinates (latitude and longitude) on all overhead view displays.  Both Lat-Lon and UTM coordinates are supported, allowing display and measurement of position to high accuracy.

•	3DEM will now load and display Global Positioning System (GPS) waypoints, routes, and tracks on both the overhead view display and all 3D projections and flyby animations.  Position data can be read directly from Garmin and Magellan GPS receivers via a serial data connection.

•	A high magnification view of overlay maps (such as Digital Raster Graphics or Digital Orthophoto Quads) is now provided.  This allows plotting and reading of GPS waypoints to high accuracy.

•	GPS waypoints may be transferred to and from the GPS receiver, the 3DEM display, and computer files.  Waypoints plotted on the magnified map display and 3D display can be transferred to and from the GPS receiver.

•	Automatic tools are provided for geo-referencing of overlay maps.  If the latitude and longitude of any two points on the map are known, any map can be used as a overlay to the 3D terrain image without the need for external cropping or sizing.

•	Automatic tools are provided for cropping the borders of Digital Raster Graphics.  Cropping using an external program is no longer necessary.

•	3DEM now provides full support for global topographic data sets including USGS GTOPO30 and NOAA GLOBE including the ability to merge multiple data tiles, save selected areas, enter and view GPS data, produce 2D and 3D terrain projections and flyby animations.

•	3DEM now supports nine different graphics file formats for saving 3D images.

•	3DEM now produces both AVI and MPEG flyby animations.

•	3DEM now exports Terragen terrain of sizes up to 4097 by 4097 in support of Terragen ver 0.8 and higher.

The major changes in Version 7 are described below

•	3DEM now provides for easy visual translation and rotation of the terrain scene without the need to re-enter numerical projection parameters.

•	3DEM will now translate and read USGS SDTS DEMs directly.

•	3DEM can now save and read both ASCII and binary matrix files of terrain data.

•	3DEM can now read CDF matrix data files directly.

•	3DEM can now produce 3D scenes from internally generated Mandelbrot Set fractals.

•	The dimensions of the 3D scene are now continuously adjustable by dragging the corner of the scene outline rectangle on the overhead view.  There is no limitation to fixed sizes of 1, 4, and 16 enlargement.

•	The field of view of the 3D scene is now adjustable, and viewpoint height adjustment is improved.

•	Overlay ovelay has been vastly simplified.  JPEG or Windows bitmap overlays of any size can now be used.  To use map overlays only requires that you know the coordinates of the map relative to the underlying DEM.

•	Color assignment to scene altitude can now be saved and recalled for later use.

•	3DEM can now print color images of the rendered 3D scenes.

•	3DEM can now save images in both JPEG and Window bitmap format.

•	3DEM can now save VRML world files for viewing and exploration via the Internet.

•	There is now no limit to the number of frames which can be recorded in a flyby animation.

•	LCS flyby animations are now saved as a series of JPEG frames rather than 8 bit color frames, resulting in superior LCS animations.


3D TERRAIN RENDERING

To produce a three dimensional scene you must perform four operations in sequence with the 3DEM software as follows:

STEP 1 - Load a new DEM, SDTS DEM, GLOBE DEM, GTOPO30 DEM, NASA Mars DTM, or Terrain Matrix file and draw an overhead view of scaled altitude data.  Choose "File - Load Terrain - Digital Model" from the overhead view menu to bring up the DEM File Type dialog box for selection of the desired file type.  Select the file type, and then locate and open the desired DEM file.  3DEM will then load the selected terrain model and draw an overhead view of the entire geographical area with color scaled to the altitude at each point on the map.

STEP 2 - Define an area within the overhead view for conversion into a three dimensional scene.  Click the left mouse button at a location on the overhead view that interests you.  The area to be viewed will be outlined by a black rectangle.  The observer's location and direction of view are indicated by a notch in one side of the outline rectangle.  Increase or decrease the size of the outline rectangle by clicking and holding down the left mouse button at any corner of the rectangle.  Then move the mouse forward or back to change the size of the area.  Reposition the outline rectangle while holding down the left mouse button.  Rotate the outline rectangle while holding down the right mouse button and moving the mouse left or right at the bottom of the display window.  You can also make fine adjustments to the rotation of the outline rectangle using the left and right arrow keys.

STEP 3 - Once you are satisfied with the selected area, compute and display a three-dimensional landscape scene.  Choose "Operation - View Scene" and 3DEM will give you a choice of terrain projection parameters as explained in the following paragraphs.  Initially, you can just accept the default values and 3DEM will proceed to render the selected projection using OpenGL.  The 3D image will be displayed in a separate window as the “3D View.”  Once the scene is complete, you can save the image as a graphics file by choosing "File – Save Scene Image" from the 3D View menu.

STEP 4 - To tilt, rotate, or shift the position of the landscape relative to the observer, choose "Operation - Rotate or Shift Scene" from the 3D View menu (or function key “F6”) to bring up the Rotate or Shift Scene Dialog Box.  These controls allow you to tilt, rotate, or move the scene to obtain the best view of the terrain.


3D FLYBY ANIMATION

A flyby animation is a stored series of 3D scenes (or frames) which are played back rapidly in sequence to produce the appearance of a flyby.  3DEM compresses these frames into either an AVI or MPEG file that can be played back with most any commercial or freeware mpeg animation player.  To produce a flyby animation you must perform four operations in sequence with the 3DEM software as follows:

STEP 1 - Load a new DEM, SDTS DEM, GLOBE DEM, GTOPO30 DEM, NASA Mars DTM, or Terrain Matrix file and draw an overhead view of scaled altitude data.  Choose "File - Load Terrain - Digital Model" from the overhead view menu to bring up the DEM File Type dialog box for selection of the desired file type.  Select the file type, and then locate and open the desired DEM file.  3DEM will then load the selected terrain model and draw an overhead view of the entire geographical area with color scaled to the altitude at each point on the map.

STEP 2 - Define an area within the overhead view for conversion into a three dimensional scene.  Click the left mouse button at a location on the overhead view that interests you.  The area to be viewed will be outlined by a black rectangle.  The observer's location and direction of view are indicated by a notch in one side of the outline rectangle.  Increase or decrease the size of the outline rectangle by clicking and holding down the left mouse button at any corner of the rectangle.  Then move the mouse forward or back to change the size of the area.  Reposition the outline rectangle while holding down the left mouse button.  Rotate the outline rectangle while holding down the right mouse button and moving the mouse left or right at the bottom of the display window.  You can also make fine adjustments to the rotation of the outline rectangle using the left and right arrow keys.

STEP 3 - Select "Operation - View Flyby" and 3DEM will give you a choice of flyby projection parameters as explained in the following paragraphs.  Initially you can just accept the default values, and 3DEM will render a real-time animated view of a flyby of the DEM landscape.  The speed of this animation will depend on the speed of your computer and graphics card, and memory available.  A fast machine will allow a frame rate of up to 10 frames per second.  If you are fortunate to have OpenGL hardware acceleration, faster frame rates are possible.  The primary purpose of this operation is to record a flight path through space over the DEM surface for subsequent conversion into a full resolution AVI or MPEG animation.  Use the keyboard arrow keys to turn, climb, and dive.  A cross mark cursor at the center of the view indicates your current flyby attitude, whether turning left or right, climbing, or diving.

STEP 4 - Once you are satisfied with the flight path through space, you can record a high resolution flyby animation as either an AVI or MPEG file which can be played back using the Windows Media Player.  Animations can be created in the following formats.

•	Conventional color animation

•	Red-blue animation for viewing with red-blue 3D glasses

•	Interlaced color animation for viewing with LCS electronic shutter glasses

•	Sequential frame animation that saves each frame individually.  This allows assembly of an animation from individual frames by other graphics programs


APPLY OVERLAY

3DEM allows you to apply graphics overlays to the terrain, ocean, and sky.  This allows more realistic land and ocean surfaces, and allows the sky to be rendered with clouds or other atmospheric effects.  Overlays are added using the Overlay Dialog Boxes. To add an overlay to your scene, take the following steps in sequence.

STEP 1 - Create or locate a suitable overlay for the terrain, ocean, or sky.  Thousands of overlay overlays are available for free download via the Internet.  Browse for a collection of overlays that fit the scenery that you are rendering.  Overlays used by 3DEM can be any of nine different graphics file formats of any dimension.  However, it is best not to use overlays of more than about 3600 pixels in width in order to keep processing time to a reasonable limit.

STEP 2 - After creating a 3D image as described above under “3D Terrain Rendering,” choose “Operation - Modify Overlays” from the 3D View menu (or function key “F5”) to bring up the Modify Overlays dialog box.  Press the “Load” button under Terrain, Ocean, or Sky as appropriate to select and load the overlay overlay file.

3DEM will create temporary bitmap files in the overlay file directory.  For this reason, overlay files should be located in a directory on your hard drive and not on CD ROM or floppy disk.  The temporary file names will end with “_lnd.bmp” or  “_ocn.bmp,” or  ”_sky.bmp.”  These files can be discarded after use.  They are not intended to be used again as overlay files.

 STEP 3 - Choose the method of overlay application to your scene.  Overlays can either “Blend” with the underlying terrain color, or “Replace” the terrain color entirely.  Overlay patterns can also either “Repeat” many times across the chosen surface or “Stretch” so that the overlay image is only repeated once across the entire width and height of the chosen surface.  Choose “Blend” and “Repeat” where you wish to apply a very fine pattern across an entire surface.  Choose “Replace” and “Stretch” where you have a large overlay image that you wish to apply as a fixed background (such as clouds for the sky).  Note that if you plan to use overlays in generating a flyby animation that you must use the “Stretch” option to fix the overlay to the underlying terrain surface.  Otherwise, the overlay image will move and flicker from frame to frame during the animation.

STEP 4 - Once your overlays are chosen, exit the Modify Overlays dialog box and 3DEM will automatically render a new scene using the overlays you have selected.  You should plan on experimenting with a number of different overlays to get the best results.


APPLY MAP OVERLAY

3DEM allows you to overlay surface maps showing roads, cities, lakes and rivers, and other features over the 3D terrain image.  For USGS 7.5 minute DEMs, these overlays can be Digital Raster Graphic (DRG) or Digital Orthophoto Quad (DOQ) files.  These map files can be very large (50 to 100 Mbytes), and processing of these overlays can be a very lengthy process.  Processing of map overlays is not recommended if you have less than 256 Mbytes of RAM or less than a 500 MHz processor.

Overlay maps must be fixed to the geographical coordinates of the underlying DEM.  To apply a map overlay using the Map Overlay Dialog Box, take the following steps in sequence.

STEP 1 - Locate a source of DEMs and corresponding surface maps that cover the same geographical area at about the same scale.  For the United States, good matches are the 7.5 Minute SDTS DEMs provided by the US Geological Survey at

http://edcwww.cr.usgs.gov/doc/edchome/ndcdb/ndcdb.html

and the Digital Raster Graphics available from the DRG Exchange at

http://216.36.33.21/~mgreger/GIS/exchange.html

The following instructions will illustrate overlay of Digital Raster Graphics on a Digital Elevation Model using the matching Snowshoe Peak, Montana, DEM and DRG available here.

STEP 2 - Download the Showshoe Peak SDTS DEM from http://edcwww.cr.usgs.gov/doc/edchome/ndcdb/7_min_dem/states/MT.html (tar.gz file) and the SnowShoe Peak DRG from http://nris.state.mt.us/nsdi/drg/d48115/index.html (tgz file).

STEP 3 - Decompress and extract the DRG TIF graphics file from the DRG tgz file.  Winzip can be used for this operation.

STEP 4 - Decompress the SDTS DEM tar.gz file into its components and convert them into a standard DEM following the instructions given under USGS SDTS Files.  Load the converted DEM into 3DEM and display the Overhead View of the terrain.

STEP 5 - Load the DRG TIF as a map overlay from the Overhead View before creating the 3D View.  Choose “Operation - Apply Map Overlay” (or Function Key F5) to bring up the Map Overlay Dialog Box.  Click the “Load” button and select the DRG TIF File.  The original TIF file is very large and must be resized for use by 3DEM.  This is a lengthy operation that may take 10 minutes or more, and you will receive a warning to this effect.  After resizing is complete, the full DRG TIF image will appear in the Map Overlay Dialog Box as shown below.

Note that if you have access to high performance graphics tools, such as PhotoShop, this resizing might be accomplished more quickly using one of these external programs.  Just resize the TIF image to a maximum width of about 3600 pixels.  However, it isn’t necessary to invest in other expensive graphics tools if you have the patience to wait somewhat longer for 3DEM to perform the task.  Resizing must only be done once for each TIF file, and the resulting resized bitmap will be saved for subsequent use.

3DEM will create temporary bitmap files in the overlay directory.  For this reason, overlay files should be located in a directory on your hard drive and not on CD ROM or floppy disk.  3DEM may require more than 100 Mbytes of free disk space to manipulate overlay files, so be certain to allow for at least this amount of free disk space.  The temporary file names will end with “_lnd.bmp” or “_mod.bmp” and these files can be discarded after use.  They are not intended to be used again as overlay files.

STEP 6 - Crop the DRG to remove the map color.  This will allow the DRG to exactly match the dimensions of the underlying DEM.  Click the ”Crop Borders” button on the Map Overlay Dialog Box to bring up a magnified map view.  The cropping tool consists of an outline rectangle with red colored cross marks at each corner.  Clicking on a corner cross mark with the mouse designates it as the active (green) corner which can then be moved with either the mouse or the keyboard arrow keys.  Go to each corner in sequence and adjust the outline rectangle so that it encloses the entire map area.  Because of the UTM coordinate system, the map will appear tilted within the outline rectangle.  Be sure to enclose the entire area of the map, even if small areas of the collar remain.  Then click “Enter” to crop the map borders.

STEP 7 - If you have correctly cropped the map overlay, it will be exactly matched to the underlying DEM, and you can proceed to create a 3D terrain image.  Choose “Operation - 3D View” (or function key F3) to create a 3D view of the terrain. Examine the resulting image to see that there is a good match between the map overlay and the underlying DEM features.  It may be necessary to adjust the map overlay coordinates or dimensions slightly to obtain a perfect match.  See Adjust Map Overlay Position which follows.


MAP OVERLAY FINE POSITION ADJUSTMENT
ADJUST MAP OVERLAY POSITION

Often, a map overlay will require fine position adjustment so that it precisely matches the features of the underlying Digital Elevation Model.  Choose “Operation - Adjust Overlay Position” from the 3D View menu (or function Key “F7”) to bring up the “Adjust Overlay Position” dialog box as shown below.

•	Vert Position - Moves the overlay vertically  (North-South) with respect to the underlying DEM.

•	Horz Position - Moves the overlay horizontally (East-West) with respect to the underlying DEM

•	Height - Increases or decreases the height of the overlay (North-South) with respect to the underlying DEM

•	Width - Increases or decreases the width of the overlay (East-West) with respect to the underlying DEM.

First choose a scene area near the southwest corner of the DEM with the observer is looking directly north.  Choose a scene that includes a prominent and identifiable surface feature that can be used for matching the position of the map overlay.  Adjust the Vert Position and Horz Position controls to match the map overlay to the position of the chosen surface feature.  Click “OK” to apply the correction to the 3D View.

Then choose a scene area near the northeast corner of the DEM with the observer looking directly north.  Choose a scene that includes a prominent and identifiable surface feature that can be used for matching the position of the map overlay.  Adjust the Height and Width controls to match the map overlay to the position of the chosen surface feature.  Click “OK” to apply the correction to the 3D View.

Because of interaction between these controls, it may be necessary to repeat this procedure several times, making small adjustments each time.  These fine controls make it possible to achieve a very precise match between the map overlay and the underlying digital elevation model.


TERRAIN POSITION DIALOG BOX
ROTATE OR SHIFT SCENE

Once a terrain scene has been created, its position in space relative to the observer can be modified using the Rotate or Shift Scene Dialog Box.  After rendering a terrain scene, choose "Operation - Rotate or Shift Scene" from the 3D View menu (or function key “F6”).

•	The Elevation of the terrain scene, relative to the observer, can be adjusted up or down using the “Move Up” or “Move Down” elevation buttons.

•	Translation of the terrain scene, relative to the observer, is possible by use of the “Left, Right” or “Move Closer, Move Away” translation buttons.

•	Rotation of the terrain scene, relative to the observer, is possible by use of the “Left, Right” or “Tilt Forward, Tilt Back” rotation buttons.

•	The “Reset Near” and “Reset Far” buttons reset the terrain position to fixed near and far positions.


TERRAIN PROJECTION PARAMETERS

Terrain projection parameters are selected using this dialog box.  Click on any control to see a description of its use in rendering a three dimensional scene.


FLYBY PROJECTION PARAMETERS

Flyby projection parameters are selected using this dialog box.  Click on any control to see a description of its use in rendering a flyby animation.


LEGEND, PROJECTION SIZE, & VIEWPOINT ALTITUDE
SCENE LEGEND & PROJECTION SIZE

These controls are available from the dialog boxes for Terrain Projection Parameters and Flyby Projection Parameters and are used to adjust the appearance of the final 3D rendering.

LEGEND

The Legend is text which will appear at the top of your finished three dimensional scene.  Initially, this legend is read from the DEM file header.  Legends in Flyby are printed at the bottom of the screen and are only displayed for the first 50 frames of the animation.  Adjust the legend words to your own preference.

 PROJECTION SIZE

For 3D terrain rendering, you have a choice of projection sizes of 640 by 480, 800 by 600, and 1024 by 768 pixels.  3D flyby animation will always be rendered in a 400 by 300 pixel window.


PROJECTION TYPE

This control is available from the dialog boxes for Terrain Projection Parameters and Flyby Projection Parameters and is used to adjust the appearance of the final 3D rendering.

The type of 3D projection for either single scenes or for flyby projections is determined here.  The "Color" selection provides a color 3D projection with surface colors determined by terrain height and the direction of illumination.  The “R/B” or “Red Blue” selection provides a 3D projection for viewing with red-blue lens 3D glasses.  The “I/L” selection provides an interlaced color 3D projection for viewing with Liquid Crystal Shutter (LCS) electronic glasses.  See the illustrations of projection type below.


FLYBY SPEED, PATH, & MAX LENGTH
FLYBY MAX LENGTH,  FLYBY SPEED

& ALTITUDE

These controls are available from the Flyby Projection Parameters dialog box and are used to adjust the appearance of the final 3D rendering.

MAX LENGTH

Select here the maximum number of frames to be included in your flyby animation.  Software MPEG playback on a fast machine will be at a rate of 20 frames per second.  Faster machines or hardware MPEG acceleration can result in greater frame rates.

 FLYBY SPEED

Flyby speed is the distance in meters over the terrain between each animation frame.  You will probably need large flyby speeds for very high altitude flybys and lower speeds for flybys close to the terrain surface.  Experiment with flyby speed during real-time flyby to choose a speed that is matched to the altitude and scale of the terrain below.

ALTITUDE

Viewpoint altitude can be adjusted to improve the field of view during a flyby.  The initial value will be a high above the landscape surface.  Lower values can be chosen depending on the terrain.  For flybys, terrain tilt is determined by the altitude so that the surface of the DEM fills the field of view.


TERRAIN TILT, VERT MAGNIFICATION, & FIELD OF VIEW
TERRAIN TILT, VERT MAGNIFICATION

& FIELD OF VIEW

These controls are available from the dialog boxes for Terrain Projection Parameters and Flyby Projection Parameters and are used to adjust the appearance of the final 3D rendering.

TERRAIN TILT

For fixed 3D scenes, terrain tilt is adjustable using the Terrain Model Orientation Dialog Box after the scene has been generated.

During Flyby, terrain tilt is automatically adjusted based on altitude above the surface.  The Flyby Projection Parameters show the value of terrain tilt for the altitude at the start of the flyby.  Lower flyby altitude results in a smaller automatic value of terrain tilt.

TERRAIN VERT MAGNIFICATION

Large scale DEMs and DTMs often show very low relief features.  Vertical magnification increases the height of surface features to make them more visible in the three dimensional projection.  Don't hesitate to use magnifications of 200% to 300% to improve the appearance of your scene.  The default value of vertical magnification is 100%, but you should change this value if you are not satisfied with the appearance of the 3D projection.

FIELD OF VIEW

The field of view, in conjunction with viewpoint altitude and scene tilt, will determine the surface area included in the 3DEM scene.  The field of view can be adjusted from 20 degrees to 45 degrees, with 30 degrees being the recommended value.  Too large a field of view will result in the edges of the selected DEM area being visible in the scene.  Too small a field of view will restrict the scene to a small area of the DEM surface.  Experiment with these values to obtain the best results.


TERRAIN RESOLUTION AND ILLUMINATION
TERRAIN RESOLUTION, ILLUMINATION, AND POSITION

These controls are available from the dialog boxes for Terrain Projection Parameters and Flyby Projection Parameters and are used to adjust the appearance of the final 3D rendering.

TERRAIN RESOLUTION

3DEM creates a 3D landscape scene by constructing a grid of elevation data from the DEM map.  The density of points in this grid determines the final scene resolution produced by OpenGL.  A resolution of one indicates that every adjacent point from the DEM map is used in constructing the OpenGL grid.  This is the highest resolution possible and will require the longest time to compute.  Faster computation can be achieved at the expense of scene resolution.  A resolution of two indicates that every second point from the DEM map is used giving a low resolution scene which can be computed quickly.

TERRAIN RESOLUTION  (VIEW FLYBY)

Choose here the resolution of the OpenGL terrain rendering for viewing a flyby in real time.  Choice of resolution will depend almost entirely on the speed of your computer graphics hardware.  A resolution of four indicates that OpenGL creates a terrain scene using every forth point from the DEM elevation map.  This is a very low resolution that should be used with slower machines or with software only implementations of OpenGL.  A resolution of two uses every second point from the DEM elevation map.  This is a high resolution that can only be supported in real time by the very fastest hardware implementations of OpenGL.

TERRAIN ILLUMINATION

OpenGL rendering uses one source of illumination at the azimuth and elevation angles chosen here.  These directions are relative to the geographic north at all times.  Zero degrees azimuth indicates a source directly from the north, while 180 degrees azimuth indicates a source directly from the south.  Zero degrees elevation indicates a source on the horizon, while 90 degrees elevation indicates a source directly overhead.  Thus the default values of 240 degrees azimuth and 60 degrees elevation indicate an illumination source from the south west.  Experiment with these values if you find a need to change the appearance of light and shadow in your three dimensional projection.

TERRAIN POSITION

The position of the terrain model can be chosen to be “Near” or “Far” relative to the observer.  A Near terrain position will fill the 3D scene with a large scale view of the selected area.  A Far terrain position will produce a miniature view of the entire selected area.  Examples of the Near and Far terrain positions are shown below.


TERRAIN TYPE

This control is available from the dialog boxes for Terrain Projection Parameters and Flyby Projection Parameters and is used to adjust the appearance of the final 3D rendering.

Normally, terrain is a combination of mountains and plains with lighting determined by the azimuth and elevation of the illumination source.  However, if you are developing a scene containing the ocean's surface you may want the sea to appear as a uniform ocean color rather than appear as a brightly lighted plane.  Choose "Mountain/Plain" for normal scenery, or "Island/Ocean" for scenery including the ocean's surface.  You can also use the "Island/Ocean" setting for scenes in which there are rivers or lakes.

If you are developing an island and ocean scene, the shape of the shore line may be adjusted by selection of a "Sea Level" value.  You may need to experiment by raising or lowering the sea level to achieve the proper shore line or river bank.  If the surface of a wide area of ocean appears streaked or mottled, try raising the sea level a few meters at a time to properly cover the entire ocean surface.  This setting is ignored for a mountain and plain scene.  See the illustrations of terrain type below.


COLOR ADJUSTMENTS
 SCENE COLORS DIALOG BOX

You can adjust the colors of many features of either the overhead view or the 3D scene.  Choose "Operation - Modify Colors" from the menu of the 3D View window (or function key “F4”) to bring up the Scene Colors dialog box for selection of the terrain color scale.  Here you can select the terrain color at each of fourteen altitude steps.  Altitude is measured from the lowest point on the surface (not from sea level).   The objective is to choose a range of colors to be spread from the lowest to the highest elevation on the surface.  Select an altitude using its button in Terrain Colors, and adjust its color using the Color Controls RGB sliders.

You can also copy a color from one altitude to another, or create a smooth transition (or Spread) between colors at different altitudes.  To copy a color, choose its altitude button in Terrain Colors, press the "Copy To" button, and then select the altitude button at the point you wish to copy the color.  To spread colors, choose a starting point from the altitude buttons in Terrain Colors, press the "Spread To" button, and then select the desired end point from the altitude buttons to create a smooth transition of colors.

You also have the option of adjusting the colors of the sky, the ocean, the edge of a projection, or the text of the scene legend using the Other Colors buttons.

And finally, you can select the Terrain Type for the 3D Scene.  Normally, terrain is a combination of mountains and plains with lighting determined by the azimuth and elevation of the illumination source.  However, if you are developing a scene containing the ocean's surface you may want the sea to appear as a uniform ocean color rather than appear as a brightly lighted plane.  Choose Mountain/Plain for normal scenery, or Island/Ocean for scenery including the ocean's surface.  You can also use the Island/Ocean setting for scenes in which there are rivers or lakes.

Once you have defined scene colors, you can store the color assignment for future recall.  The Scene Colors dialog box gives you the capability to store and recall two different scene color assignments.  When you close the 3DEM program, these two color assignments will be saved in a file named “3dem.ini” in the same directory as the 3DEM program.  Then when you run 3DEM again, these stored colors will be available for recall and use.


Color Scale
OVERHEAD VIEW COLOR SCALE

Choose “Color Scale - Show Scale” from the main menu to show a color scale for the overhead view.  This color scale matches colors to altitude on terrain surface.  Altitude is measured from the lowest point on the surface (not from sea level).   The objective is to choose a range of colors to be spread from the lowest to the highest elevation on the surface.

Choose “Color Scale - Modify Scale” to modify the color scale.  See the previous description of the Scene Colors dialog box for instructions on adjusting colors.


SCENE OVERLAYS DIALOG BOX
OVERLAY DIALOG BOXES

3DEM allows you to apply graphics file overlays to the surfaces of the terrain, ocean, and sky using two different methods.  To apply a map overlay (such as Digital Raster Graphics or Digital Orthophoto Quad) to the terrain surface, use the Map Overlay Dialog Box.  Choose “Operation  - Apply Map Overlay” (or function key F5) from the Overhead View menu.  The Map Overlay Dialog Box is used to load, resize, crop, and geo-reference surface maps, and to accurately position them relative to the underlying DEM and will apply a map overlay to both the Overhead View and the 3D View of the terrain.  Overlays created with the Map Overlay Dialog Box also enable the option for a magnified map display which can be used for precision entry of Global Positioning System (GPS) waypoints.  See the description of the 3DEM GPS interface that follows.

Once you have created a 3D view, the Modify Overlays Dialog Box is used to add, remove, or modify overlays to the terrain surface, the ocean surface, and the sky.  Choose “Operation - Modify Overlays” from the 3D view menu (or function key F5).  Usually this procedure is used to apply overlay textures or repeating patterns rather than to apply surface map overlays.


OPTIONS FOR OVERLAY APPLICATION

These controls are available from the Overlays Dialog Boxes and are used to select overlays for application to the scene terrain, ocean, and sky.

LOAD AND UNLOAD

Use the “Load” and “Unload” buttons to choose a overlay or discard a overlay for either the terrain, ocean, or sky.  The overlay you choose will be previewed in the small window above the selection buttons.  Overlays used by 3DEM can be any of nine different graphics file formats of any dimension.  However, it is best not to use overlays of more than about 2048 pixels in width in order to keep processing time to a reasonable limit.  3DEM may create temporary bitmap files in the overlay directory.  For this reason, overlay files should be located in a directory on your hard drive and not on CD ROM or floppy disk.  3DEM may require more than 100 Mbytes of free disk space to manipulate overlay files, so be certain to allow for at least this amount of free disk space

BLEND OR REPLACE

Overlays can be applied so that their colors either blend with the underlying terrain, or replace the colors of the underlying terrain.  The “Blend” and “Replace” buttons are used to make this selection.  In either case, the resulting surface is deformed and shaded to match the peaks and valleys of the underlying terrain.

REPEAT OR STRETCH

Overlays can either repeat many times across a surface, or stretch so that the overlay exactly matches the surface and is only repeated once.  The “Repeat” and “Stretch” buttons are used to make this selection.  Choose  “Repeat” where you wish to apply a very fine pattern across an entire surface.  Choose “Stretch” where you have a large overlay image that you wish to apply as a fixed background (such as clouds for the sky or a surface map overlay for the terrain).  Note that if you plan to use overlays in generating a flyby animation that you must use the stretch option to fix the overlay to the underlying terrain surface.  Otherwise, the overlay image will move and flicker from frame to frame during the animation.

CROP BORDERS BUTTON

Clicking the “Crop Borders” button will initiate tools for cropping a overlay image to remove unneeded borders or other areas.  Cropping is particularly useful when using Digital Raster Graphics (DRG) files as map overlays.  DRGs are usually scanned images of paper maps that have a wide border around the useful map area.  Cropping of DRGs is also necessary in order for the overlay map to exactly match the dimensions of the underlying DEM.  Click the ”Crop Borders” button to bring up a magnified map view and cropping tool.  The cropping tool consists of an outline rectangle with a red colored cross mark at each corner.  Clicking on a corner cross mark with the mouse designates it as the active (green) corner which can then be moved with either the mouse or the keyboard arrow keys.  Move to each corner in sequence and adjust the outline rectangle so that it encloses the entire map area.  Because of the UTM coordinate system of the map, it will appear tilted within the outline rectangle.  Be sure to enclose the entire area of the map, even if small areas of the collar remain.  Press the “Enter” key to complete the cropping process.

GEO-REFERENCE BUTTON

Clicking the “Geo-Reference” button will bring up a magnified map view and initiate tools for accurate referencing of the overlay map to the coordinates of the underlying DEM.    See the section on Geo-Reference for more complete instructions.


GEO-REFERENCING PROCEDURE

After you have loaded a Digital Elevation Model and applied a map overlay, the geo-referencing tools in 3DEM can be used to accurately match the position of the map overlay to the underlying DEM.  Geo-referencing requires that you know the coordinates (latitude and longitude) of at least two points on the map overlay.  The tools provided by 3DEM allow you to designate these two points on a magnified map image and will then automatically adjust the position of the map overlay as necessary for an accurate match.

Choose “Operation - Apply Map Overlay” (or function key F5) from the Overhead View window to load the selected map using the Map Overlay Dialog Box. Then click the “Geo-Reference” button.  The geo-referencing tools consist of two moveable cross-mark pointers that can be positioned on the magnified map.

Position the red marker at any position on the left (west) side of the map, and the blue marker at any position on the right (east) side of the map.  These two points must be separated vertically and horizontally to the greatest extent possible.  Ideally these two points would then be located in diagonally opposite corners of the map.  Enter the known decimal values of latitude and longitude of the two points in the text entry box provided and click the “OK” button.  3DEM will then apply these corrections to the map overlay.  Please remember, LONGITUDE IN THE WESTERN HEMISPHERE IS NEGATIVE in value.


GEO-REFERENCING PROCEDURE
ALTERNATIVE GEO-REFERENCING PROCEDURE

If you are working with a terrain matrix file in X-Y coordinates, an alternative procedure is available that allows you to match the overlay  relative to the underlying digital elevation model.  The surface map and the DEM are aligned by specifying the relative coordinates of the southwest corner and the width and height of the map overlay relative to the underlying DEM.  These values are defined as follows:

West Coord  = (Distance, west edge of DEM to west edge of map overlay)/(Total DEM Width)

South Coord  = (Distance, south edge of DEM to south edge of map overlay)/(Total DEM Height)

Width = (Width of map overlay)/(Total DEM Width)

Height = (Height of map overlay)/(Total DEM Height)

By definition, if the underlying DEM and the map overlay are perfectly matched, then

West Coord  = 0.0	Width  = 1.0 	South Coord = 0.0	Height  = 1.0

These relative coordinates are ratios that can be computed using any unit of measure (feet, meters, pixels) that is common to both the DEM and the overlay map.


GPS Interface
GLOBAL POSITIONING SYSTEM (GPS) INTERFACE

3DEM can transfer  position data (waypoints)  to and from Garmin and Magellan handheld GPS receivers via a serial data connection.  3DEM will connect these waypoints with a solid line in the order in which they appear in the waypoint file.  This allows you to record GPS waypoints during a trek through the wilderness, and then visualize the traveled path on the overhead view and 3D projection of the terrain. Choose “GPS - Transfer Waypoints” to bring up the GPS interface dialog box as shown below.

Either a Garmin or Magellan receiver may be selected.  Garmin receivers must be set up for GRMN/GRMN interface using the internal system menu and always operate at 9600 baud.  Magellan receivers must be set up for either 4800 or 9600 baud both at the receiver and at 3DEM.  Then serial data transfer can be established using either COM1 or COM2 serial ports on your computer.  The interface operates with full duplex data transfer using 8 data bits, no parity, and 1 stop bit.  A complete range of waypoint transfers is possible including:

• Receiver to Screen	• Screen to Receiver	• File to Screen
• Receiver to File	• Screen to File	• File to Receiver
3DEM will display waypoints, routes, or tracks stored in the GPS receiver using the “Receiver to Screen” option.  Waypoints and routes are made up of individual points that have been entered by the user to mark position along a trail.  Tracks consist of the internal track log of the GPS receiver used to plot a smooth track curve on the GPS display.  In general, a track will be made up of hundreds of individual points.  3DEM will plot up to 2000 track points.

The magnified map display available in 3DEM allows plotting of waypoints to a few meters accuracy on an overlay map, and then transferring these points to the GPS receiver using the “Screen to Receiver” option.  This also allows planning a course or trail with high accuracy, and then visualizing it with the 3D view, 3D flyby animation, or VRML worlds created by 3DEM.  Choose “Operation - Map Overlay View” from the Overhead View to see the magnified map display.

Before sending waypoints from 3DEM to the receiver, the best practice is to save the receiver’s existing waypoints to a file, delete all waypoints in the receiver, and then transfer the new waypoints from 3DEM using the “Screen to Receiver” option.  This will avoid the possibility of writing over or losing waypoints saved in the receiver.  The saved waypoints can be restored to the receiver by reading them back using the “File to Receiver” option.

3DEM also provides the option of entering waypoints manually.  Choose “GPS - Enter Waypoints by Mouse,” and then click the left mouse button to enter waypoints in sequence.


GPS Waypoints
GLOBAL POSITIONING SYSTEM (GPS) WAYPOINT FILES

3DEM stores GPS waypoints as a series of latitude - longitude pairs in an ASCII text file as shown below.  Values are in decimal degrees.  Files of this type can be saved from the GPS receiver, and from the 3DEM screen display.  Recorded files can be transferred back to either the GPS receiver or to the 3D display generated by 3DEM.

036.24189  	-112.39382

036.23236  	-112.41530

036.21490 	-112.41530

036.20062  	-112.43288

036.20379  	-112.45046

036.21808  	-112.44851

036.23077  	-112.45632

036.23712  	-112.47390


SAVING TERRAIN DATA

Terrain data can be saved for future use with 3DEM or other applications.  It is particularly useful after merging a large number of USGS DEMs to save the entire surface as a terrain matrix file.  This compact file can then replace all of the individual merged DEMs.

Choose “File - Save Terrain Matrix” to save the entire terrain as a binary terrain matrix file with associated ASCII header file.  See the description of terrain matrix files that follows.


SAVING TERRAGEN DATA FILES
SAVING TERRAGEN TERRAIN FILES

3DEM can export data files for use by the Terragen terrain rendering program.  Terragen can produce spectacular clouds and atmospheric effects and also provides advanced surface texturing capability.  Terragin can be found at http://www.planetside.co.uk/terragen/ on the Internet.

To create Terragen terrain files, load a terrain digital model into 3DEM.  Choose the area to be converted from the overhead view by rotating and sizing the black outline rectangle.  Then render a 3D scene by choosing “Operation – View Scene.”  Once you are satisfied with the scene selection, choose “File – Save Terragen Terrain” from the 3D View Menu.  3DEM will then save a terrain *.ter file which can be opened and displayed by Terragen.

3DEM will export Terragen terrain in sizes up to 4097 by 4097 in support of Terragen version 0.8 and higher.  3DEM attempts to find the best match between the dimension chosen in 3DEM and the fixed dimension allowed by Terragen (257, 513, 1025, etc). The rules for dimension matching are as follows:

3DEM less than 383 results in Terragen 257;
3DEM from 384 to 767 results in Terragen 513;
3DEM from 768 to 1535 results in Terragen 1025;
3DEM from 1536 to 3071 results in Terragen 2049;
3DEM greater than 3072 results in Terragen 4097.

You can directly measure the dimension chosen in 3DEM using the overhead view color scale. Choose "Color Scale - Show Scale - Meters" and read the scene width in meters at the bottom of the scale. For 30 meter SDTS DEMs, divide the scene width by 30 meters to get the 3DEM dimension. For the large 1 degree USGS DEMs, divide the scene width by 90 meters to get the 3DEM dimension.


SAVING VRML WORLDS

3DEM can save a 3D scene as a Virtual Reality Modeling Language (VRML) world file (*.wrl) which can then be viewed and explored in real time over the Internet using a VRML plug-in to your web browser.  The Silicon Graphics COSMO player available at http://cosmosoftware.com is highly recommended.

Once you have generated a 3D scene choose “File - Save VRML World” from the 3D View menu.  Then you will be presented with the VRML dialog box for selection of the level of detail in the VRML world.

Surface Smoothness can be chosen to be either “Flat” or “Smooth,” which indicates either flat face or smooth shading in the rendering produced by the VRML player.  Smooth shading improves the appearance of the surface somewhat, but at an enormous increase in the size of the world file.  Flat shading is recommended for any world file that will be downloaded via the Internet in order to keep the download time to a reasonable limit.  You can use smooth shading on your local machine for improved appearance when download times are not a concern.

World Dimension is the number of points per side which make up the VRML terrain grid.  If N is the world dimension chosen, the number of individual triangular faces making up the VRML world is 2*(N-1)*(N-1).  So a VRML world with a dimension of 200 will be made up of almost 80000 faces.  Obviously, World Dimension requires a trade-off between level of detail and the size of the resulting world file.

Field of view is the angular field of view, which will be used by the VRML player.  A value of 45 degrees is normal, but you can choose narrower fields if necessary to improve the appearance of the scene.  Note that this field of view is independent of the field of view that you have selected within 3DEM for the 3D scene rendering.

3DEM creates the VRML world by first constructing a terrain grid of elevation values and then by rendering a JPEG overhead image  of the selected terrain.  The terrain grid is saved in the *.wrl file, and the JPEG image is saved separately as a *.jpg file.  Both of these files are then used by the VRML player to display the world.  The terrain grid defines the surface elevation at each point in the world, and the JPEG image is applied as a overlay overlay to define the colors at each point in the world.  If you plan to use the VRML on a web page, be sure that the associated JPEG file is also available and can be located by the VRML player.

When creating VRML worlds, use the largest screen size that your monitor will support.  1600 by 1200 is good if you can reach it.  It is desirable to create the largest and most detailed JPEG overlay overlay possible since this image defines the smallest visible details in the world surface.  OpenGL needs the entire surface of the monitor to produce this image, so the largest screen size possible should be used in creating the VRML world.  However viewing of the VRML world can be done at any screen resolution.


SAVING SCENE IMAGES

3DEM has many options for saving images as graphics files.  The following graphics file formats are available.

Windows Bitmap (*.bmp, *.dib)

Joint Photograhic Experts Group  (*.jpg,, *.jpeg)

Zsoft Paintbrush (*.pcx)

Portable Network Graphics (*.png)

Portable Image  (*.pnm, *.ppm, *.pgm)

Sun Raster Image (*.ras. *.sun)

Silicon Graphics RGB (*.rgb, *.rgba, *.bw, *.sgi)

Truevision Targa (*.tga)

Tagged Image File (*.tif, *.tiff)

X-Pixmap (*.xpm)

Both the Overhead View and the 3D View can be saved as graphics files.  To save the Overhead View, choose "File - Save Map Image" from the overhead view menu.  To save the 3D View, choose “File - Save Scene Image” from the 3D View menu.  Image magnification is provided as an option where the image is to be printed or displayed in another application.  Often an image printed at a high value of dots per inch will appear much smaller than on your computer screen.  Use the “Size When Printed” controls to predict the final printed size of your image as determined by magnification and the dots per inch of your printer.


PRINTING IMAGES

Once you have created a 3D image, you can send it directly to a printer by selecting “File - Print Scene Image” from the 3D View window menu.  This will bring up a standard Windows Print Dialog Box for selection of the printer and page setup.  The size of the printed image will be automatically adjusted to match the size the paper being used.


MANDELBROT AND JULA FRACTALS
MANDELBROT FRACTALS

3DEM can produce 3D projections and flyby animations from Mandelbrot Fractals.  Choose "File - Load Terrain - Mandelbrot Set" from the menu of the overhead view window to generate a random fractal landscape.

You will be presented with dialog boxes for choosing the position, magnification, and number of iterations used in calculating the fractal image.  The use of each of these controls is as follows:

X Position, Y Position, X Start and Y Start specify the starting location for calculation of the fractal.  If you already know the needed parameters for a particular fractal location then they can be entered here.  Otherwise, these values are selected by clicking the mouse on an area of interested on the overhead view of the fractal.

Interior points of the fractal can be chosen to be either sunken or level with the upper surface.  This characteristic will only be visible in the 3D image and not in the overhead view of the fractal.  This selection is available to improve the appearance of the 3D image.

Plateau Height determines the shape and color of the highest elevations of the fractal 3D image.  3DEM displays these fractals using the mathematical “Continuous Potential” method which results in images with large peaks and smoothly sloping sides.  The plateau is defined as a flattened area at the peak elevations upon which the colored fractal image is drawn.  Experiment with the Plateau Height to obtain the most satisfactory images.

Magnification here is the number of times the scale of the fractal has been doubled.  A magnification of zero gives the widest view of the fractal.  A magnification of 1 increases the scale by a factor of two.  A magnification of 2 increases the scale by a factor of 4.  A magnification of 6 increases the scale by a factor of 64, and so forth

The Zoom In and Zoom Out buttons add or subtract one from the value of magnification.

Max Iterations is the number of iterations used in the calculation of the fractal surface.  Larger values will increase the detail visible in the fractal at the expense of a great increase in computation time.  Keep this value as low as possible to achieve the detail needed in the fractal surface.

The Recompute button recalculates the fractal surface using the magnification and position values that you have entered.

Once you have found an interesting area of the fractal in the overhead view, choose “Operation -View Scene” from overhead view menu to render a 3D image of the selected area.


FRACTAL LANDSCAPE SCENES

3DEM can produce 3D projections and flyby animations from random fractal landscapes.  Choose "File - Load Terrain - Fractal Surface" from the overhead view menu to generate a random fractal landscape.  You will be presented with a dialog box for choosing the "Seed" value for the computer's random number generator and the number of random elements (from 64 to 512) used in synthesis of the fractal surface.  Each Seed value will result in a unique surface.  Increasing the number of elements increases the roughness of the surface.  Experiment with these two controls to see the effect that they have on the surface produced.


TYPES OF DIGITAL ELEVATION MODELS
3DEM FILE SELECTION

Choose “File - Load Terrain Model - Digital Model” from the main menu to bring up a dialog box for selection of the type of input data to be used.  Each of these selections represents DEM data which is freely available on the Internet.  Click on any data item in the figure below for a detailed description.


USGS DIGITAL ELEVATION MODEL (DEM) FILES

SOURCES OF DATA - DEM files are available via ftp for most of the United States and many other areas of the globe. The USGS offers a large selection of 1 degree DEM files at

http://edcwww.cr.usgs.gov/glis/hyper/guide/1_dgr_demfig/states.html.

A good choice is Grand Canyon East in the Arizona listing.  Be sure to download the compressed version.  The uncompressed DEM is about 10 MB.  You can use WinZip to decompress these files.  However, you MUST disable "TAR File Smart CR/LF Conversion" in "Options - Configuration." Otherwise, the decompressed file will have added bytes and will not be readable by 3DEM.  Also, you must rename the decompressed file by adding a “.dem” file extension in order for it to be recognized by 3DEM.

USING DEM FILES - Choose "File - Load Terrain - Digital Model" from the overhead view menu to bring up the “Open DEM File” dialog box.  Then select the USGS DEM file type from the “Files of Type” listing.  Locate the desired file and click “Open.”


USGS SDTS DEM FILES

SOURCES OF DATA – 7.5 minute SDTS DEMs for the entire United States are available for download from the USGS at http://edcwww.cr.usgs.gov/doc/edchome/ndcdb/ndcdb.html.  These files are downloaded in *.tar.gz” format and must be decompressed into a group of 18 files which make up a spatial data transfer.  You can use WinZip to decompress these files.  However, you MUST disable "TAR File Smart CR/LF Conversion" in "Options - Configuration." Otherwise, the decompressed file will have added bytes and will not be readable by 3DEM.  Also, please note that the downloaded archive must have a file name that ends with “.tar.gz”.  Some browsers will change this filename on download to end with “_tar.gz” and WinZip will fail.  Please correct the file name if necessary before using WinZip to decompress the SDTS files.

USING SDTS DEM FILES – The 18 files which make up the spatial data transfer must be converted into a single standard DEM file before use by 3DEM.  This conversion capability is built into 3DEM and operates as follows.  Choose “File - Load Terrain - Digital Model” from the overhead view menu to bring up the “Open DEM File” dialog box, and then select “USGS SDTS DEM.   Then you can select any one of the 18 *.ddf” files which make up the spatial data transfer and click “Open.”  3DEM will ask you for a filename of the conversion DEM and then proceed to convert the spatial data transfer into a standard DEM file, load the converted DEM, and display an overhead view.

Also please note that all of the 18 files that make up the spatial data transfer will end with “.DDF”.  To use these files, you must see a file named something like xxxCELO.DDF.  If you have a file with a name something like xxxxLE##.DDF then this is in a SDTS Digital Line Graph (DLG) directory and will not work with 3DEM. Refer to ftp://ftp.blm.gov/pub/gis/ for utilities to convert DLG files.


USGS GTOPO30 DEM FILES

SOURCES OF DATA - Global 30 Arc Second Elevation Data Sets consisting of elevation measurements at intervals of 30 by 30 arc seconds (about 1KM) are available for the entire globe from

http://edcwww.cr.usgs.gov/landdaac/gtopo30/gtopo30.html

GTOPO30 DEMs are downloaded in compressed .tar.z format.  You can use Winzip to decompress these files.  However, you MUST disable "TAR File Smart CR/LF Conversion" in "Options - Configuration." Otherwise, the decompressed file will have added bytes and will not be readable by 3DEM.  You only need to decompress the *.dem and *.hdr files from the compressed archive file.  Both the DEM file and the header file must be present in the same directory for use by 3DEM.

USING GTOPO30 DEM FILES - 3DEM is designed to merge together multiple GTOPO30 DEM files to provide continuous surface coverage of the entire globe.  Choose "File - Load Terrain Model - Digital Model" from the overhead view menu to bring up the “DEM File Type” dialog box.  Then select “GTOPO30 Tile” and you will be presented with the “Coordinate Selection” dialog box for selection of the geographical position and width (in degrees) of the area to be mapped.

Select a geographical location by clicking on the map of world.  Make fine adjustments in latitude and longitude using the slider controls provided.  Once you have selected a geographical position and map width, click “OK” and 3DEM will prompt you in sequence to locate and load the GTOPO30 DEM files which are needed to construct the desired map.  A file dialog, with the name of the file to be located contained in the title bar, will appear for each file in sequence.  You must locate and load each file that is named in the title bar of the file dialog.  Once all files have been loaded, 3DEM will proceed to draw an overhead view of the selected area.

3DEM provides a choice of either “Lat/Long” or “Cosine” map projection when loading GTOPO30 DEMs.  The Lat/Long projection produces a rectangular surface grid with equal extension in latitude and longitude.  The disadvantage of the Lat/Long projection is distortion at high latitudes.  If you are creating images at high latitudes, try the Cosine projection, which produces a surface grid corrected for latitude and a more realistic overhead view and 3D projection.


NOAA GLOBE DEM FILES

SOURCES OF DATA - Global Land One-km Base Elevation (GLOBE) files consisting of elevation measurements at intervals of 30 by 30 arc seconds (about 1KM) are available from

http://www.ngdc.noaa.gov/seg/topo/globe.shtml

GLOBE files are downloaded in compressed tar.z format.  You can use Winzip to decompress these files.  However, you MUST disable "TAR File Smart CR/LF Conversion" in "Options - Configuration." Otherwise, the decompressed file will have added bytes and will not be readable by 3DEM.

There are two ways to obtain GLOBE terrain data.  You can either download complete GLOBE tiles with dimensions of approximately 40 degrees in latitude and 90 degrees in longitude, or you can interactively select a smaller area to be download as a binary terrain matrix (*.bin) and a corresponding file header (*.hdr).

USING GLOBE TERRAIN MATRIX FILES - When you select a subset or smaller area from a complete GLOBE tile to be downloaded, you will receive a terrain matrix file (*.bin) and a header file (*.hdr).  These files can be read directly by 3DEM.  See the description of Terrain Matrix Files that follows.

USING GLOBE TILES - If you are able to download complete GLOBE tiles, 3DEM can be used to merge these tiles together to provide continuous surface coverage of the entire globe.  Choose "File - Load Terrain Model - Digital Model" from the overhead view menu to bring up the “DEM File Type” dialog box.  Then select “GLOBE Tile” and you will be presented with the “Coordinate Selection” dialog box for selection of the geographical position and width (in degrees) of the area to be mapped.

Select a geographical location by clicking on the map of world.  Make fine adjustments in latitude and longitude using the slider controls provided.  Once you have selected a geographical position and map width, click “OK” and 3DEM will prompt you in sequence to locate and load the GLOBE Tiles which are needed to construct the desired map.  A file dialog, with the name of the file to be located contained in the title bar, will appear for each file in sequence.  You must locate and load each file that is named in the title bar of the file dialog.  Once all files have been loaded, 3DEM will proceed to draw an overhead view of the selected area.

3DEM provides a choice of either “Lat/Long” or “Cosine” map projection when loading GLOBE DEMs.  The Lat/Long projection produces a rectangular surface grid with equal extension in latitude and longitude.  The disadvantage of the Lat/Long projection is distortion at high latitudes.  If you are creating images at high latitudes, try the Cosine projection, which produces a surface grid corrected for latitude and a more realistic overhead view and 3D projection.


NASA MARS VIKING ORBITER DIGITAL TERRAIN MODEL (DTM) FILES

SOURCES OF DATA - DTM files for Martian landscapes are available on NASA CDROM.  Volume 7 of the 14 Volume Mars Digital Image Map collection contains the Digital Topographic Map of the entire surface of Mars.  This CDROM is available for a modest price from the National Space Science Center.  Contact request@nssdca.gsfc.nasa.gov to request a copy of the NSSDC CDROM catalog.

      DTM files on the NASA CDROM are named as "tg00n000.img" or "tg00s000.img" where "00n" or "00s" are degrees latitude (north or south) and "000" is degrees west longitude.  Note that 3DEM will also process the large scale "te" and "tc" DTMs on the NASA CDROM.  However, these files are so large that you should not attempt them without 16MB of RAM.  The CDROM also contains digital photographic images of the surface of Mars named as "mg00n000.img" or "mg00s000.img." Don't confuse these photo files with the digital topographic map files.

DTM files for Martian landscapes are freely available on line at

http://www-pdsimage.jpl.nasa.gov/jbcache/viking/vo_2007/

Here you will see a large group of folders with names beginning with the letters "mg" and "tg".  Always choose a "tg" folder to get digital maps ("mg" files are photo images).  The following files are good choices:

tg15S067.img	Valles Marineris area

tg00N067.img	Valles Marineris area

tg45S010.img	Crater Lohse

tg45S270.img	Crater Krishtofovich

tg45N070.img	Crater Tanais

Your best approach is to know in advance the latitude and longitude of a feature you wish to explore, and then select the appropriate map for downloading.

USING DTM FILES - Choose "File - Load Terrain - Digital Model" from the overhead view menu to bring up the “Open DEM File” dialog box.  Then select the NASA MARS DTM file type from the “Files of Type” listing.  Locate the desired file and click “Open.”  DTM files must be named *.img to be recognized by the program.


TERRAIN MATRIX FILES

Terrain matrix files are the most flexible and efficient way to store and retrieve terrain data for use by 3DEM.  These binary files are made up of a sequence of elevation measurements stored row by row (that is row 1, followed by row 2, etc).  Elevation measurements are stored as 16 bit integers.  Terrain matrix files usually have an associated ASCII header file (*.hdr) which stores information about the number of rows and columns, latitude and longitude limits, map projection, etc.  3DEM uses the concept of a binary terrain matrix file and header file when saving its own terrain data for future use.

SOURCES OF DATA - Good examples of terrain matrix files are the NOAA GLOBE DEMs available on the Internet at

http://www.ngdc.noaa.gov/seg/topo/globe.shtml

From this location, terrain matrix files containing terrain measurements at 1000 meter resolution for any selected area of the globe can be downloaded at no cost.  An associated ASCII header file is also included.

An example of the ASCII header file format for GLOBE binary terrain matrix files is given below.  This same header format is used when saving any terrain matrix file with 3DEM.

file_title             = Greece

data_type              = raster

grid_cell_registration = center

map_projection         = Lat/Lon

left_map_x             = 19.99999992000

right_map_x            = 26.00000006160

upper_map_y            = 42.00000001920

lower_map_y            = 35.99999994960

number_of_rows         = 720

number_of_columns      = 720

grid_size              = 0.00833333333

elev_m_unit            = meters

elev_m_minimum         = 1

elev_m_maximum         = 2882

elev_m_missing_flag    = -500

USING TERRAIN MATRIX FILES - Choose "File - Load Terrain Model - Digital Model" from the overhead view menu to bring up the dialog box for selection of file type.  Then select “Terrain Matrix File” and the filename of interest.  If a corresponding header file is also present, 3DEM will read both files and proceed to complete an overhead view of the terrain.  If the header file is not present, then you will be prompted to enter the needed parameters such as number of rows and columns, etc.  See below.

USING OTHER MATRIX FILES OR FILES WITHOUT HEADERS - 3DEM will also read terrain matrix files containing data elements of other types (floating point, ASCII, long integers) or files without an associated file header.  In this case, you will be prompted to enter the needed values of row and column, data type, etc. as described below.

DATA FORMAT AND OFFSET - Elevation data must be defined as signed or unsigned 16 bit integers (INT OR UINT), 32 bit integers (INT), 32 bit floating point values (FLOAT), or as ASCII integers (ASCII INT).  Also, if the start of the terrain data is offset from the start of the file, enter the offset size in bytes here.

DATA BYTE ORDER - You must also specify the byte order of the elevation data.  Most data files produced by machines with Intel processors will contain "Little Endian" data in which the least significant byte is first in the data word.  Other computers (such as the Macintosh) will produce files of "Big Endian" data in which the most significant data byte is first in the data word.  You will find topographic data of both types on the Internet, and this selection gives you the option of processing both.

MISSING DATA - Some matrix data files will fill in missing data points with a fixed value other than zero.  Sometimes a large negative number such as -9999 is used to distinguish missing data points.  If you know this value, enter it here.  Otherwise enter zero.

MATRIX DIMENSIONS - You must also specify the matrix size as number of columns (width) and number of rows (height).  Column order may be specified as West to East, or East to West.  Row order may be specified as North to South, or South to North.

HORIZONTAL GRID SPACING - You must also specify the horizontal grid spacing for the data matrix.  This is just the physical distance between map grid points in the horizontal plane and usually varies from 10 meters to 500 meters or more.

VERTICAL UNITS - Finally, you must specify the unit of measure of elevation data stored in the data matrix (meters or feet).

OTHER CONSIDERATIONS - You may find large matrix files which require more system memory than you have available, or are so large that processing time is excessive.  When this happens, you can choose to load a partial matrix consisting of a limited group of matrix rows.  Choose a byte offset to the start of a row of interest, and then choose a limited number of rows to be analyzed.  The number of columns should always be equal to the full column dimension of the matrix file.


ALL OTHER MATRIX FILE FORMATS
OTHER MATRIX FILE FORMATS

3DEM can also read and display other matrix data file which are organized as rows and columns of elevation values.  Elevation values can be read as ASCII integers, binary 16 bit integers, or binary 32 bit floating point numbers.  Elevation values in the file must have been stored sequentially row by row (that is, row one followed by row two, etc) where each row is made up of sequential columns.  Choose “File - Load Terrain - Digital Model” from the overhead view menu, and select  “Terrain Matrix” to bring up the “Open Terrain Matrix” dialog box.  Choose “Files of Type - All Files” and then select the desired matrix data file.  Note that if 3DEM finds a header file *.hdr of the same name as the matrix data file, it will assume that you are loading a terrain matrix file as described above.  Otherwise, you will be presented with the “Matrix Data Format” dialog box for entry of the number of rows and columns, data format, grid spacing, etc. as described below.

DATA FORMAT AND OFFSET - Elevation data must be defined as signed or unsigned 16 bit integers (INT OR UINT), 32 bit integers (INT), 32 bit floating point values (FLOAT), or as ASCII integers (ASCII INT).  Also, if the matrix data file has a header section prior to the start of the elevation data, specify the header size here as "Offset" in bytes.

DATA BYTE ORDER - You must also specify the byte order of the elevation data.  Most data files produced by machines with Intel processors will contain "Little Endian" data in which the least significant byte is first in the data word.  Other computers (such as the Macintosh) will produce files of "Big Endian" data in which the most significant data byte is first in the data word.  You will find topographic data of both types on the Internet, and this selection gives you the option of processing both.

MISSING DATA - Some matrix data files will fill in missing data points with a fixed value other than zero.  Sometimes a large negative number such as -9999 is used to distinguish missing data points.  If you know this value, enter it here.  Otherwise enter zero.

MATRIX DIMENSIONS - You must also specify the matrix size as number of columns (width) and number of rows (height).  Column order may be specified as West to East, or East to West.  Row order may be specified as North to South, or South to North.

HORIZONTAL GRID SPACING - You must also specify the horizontal grid spacing for the data matrix.  This is just the physical distance between map grid points in the horizontal plane and usually varies from 10 meters to 500 meters or more.

VERTICAL UNITS - Finally, you must specify the unit of measure of elevation data stored in the data matrix (meters or feet).

OTHER CONSIDERATIONS - You may find large matrix files, which require more system memory than you have available, or are so large that processing time is excessive.  When this happens, you can choose to load a partial matrix consisting of a limited group of matrix rows.  Choose a byte offset to the start of a row of interest, and then choose a limited number of rows to be analyzed.  The number of columns should always be equal to the full column dimension of the matrix file.


MERGING DEMS

3DEM provides the capability to merge multiple DEMs to cover a large surface area at high resolution.

For USGS 7.5 minute and 1 degree DEMs, choose “File - Load Terrain Model - Digital Model” and select “USGS Standard DEM.”  Then you can select multiple DEM files (from a common directory) to be merged into one overhead view.  That is, all of the DEMs to be merged must be contained in the same file directory.  To select multiple files, highlight each file required using the mouse, and then click OK to load all files into 3DEM.  The only limit to the number of DEMs that can be merged is memory in your computer.  Note that if you are merging a large number of DEMs (greater than 10), it is best to keep all of the filenames short.  A large number of very long filenames will overflow the memory space that Windows allows for selection of multiple filenames, resulting in “Cannot Open File” or “Not Enough Memory” error messages.

DEMs to be merged must be adjacent to each other and must be of the same type (7.5 minute or 1 degree).  Note that merged DEMs do not always match perfectly at their boundaries since the quality and accuracy of each DEM can vary widely.  3DEM makes the best match possible with the selected DEMs.

For USGS SDTS DEMs, it is first necessary to convert from the SDTS format to the standard DEM format before merging can take place.  For each SDTS DEM, choose “File - Load Terrain Model - Digital Model” and select “USGS SDTS DEM.”  3DEM will convert the SDTS DEM to a standard format DEM that must then be stored in a common directory for merging with other standard format DEMs.

For GTOPO30 and GLOBE DEMs, 3DEM will automatically determine which DEM tiles must be merged to cover the surface area selected.  See the previous description of GTOPO30 DEMs and GLOBE DEMs.


FILES NOT RECOGNIZED BY 3DEM
COMMON PROBLEMS

MISSING Opengl32.dll

If your Windows 95 system does not have Opengl32.dll installed, you will receive an error message upon program startup.  You can download the missing files from the 3DEM home page at

http://www.microtopo.com

OPENGL RENDERING FAILURE

3DEM is designed to work with the Win95/98/NT software implementation of OpenGL, which includes opengl32.dll and glu32.dll.  3DEM may not always work correctly with other OpenGL software drivers or with OpenGL hardware acceleration provided by some advanced graphics cards.  Symptoms of this kind of failure are either a completely black OpenGL window or a scrambled image in the OpenGL window.  In this case, the only solution may be to disable hardware acceleration and return to use of the original Windows software implementation of OpenGL.

FILES NOT RECOGNIZED BY 3DEM

 File extensions must be of the proper type before files will load correctly.  3DEM expects that USGS DEM and GTOPO30 DEM files will be named *.dem, and DTM files will be named *.img.  If a DEM or GTOPO30 DEM file which you download does not have the ".dem" file extension, you must rename the file before loading it into 3DEM.  Terrain matrix files must be named *.bin and have an associated header file named *.hdr.

FAILURE TO CONVERT SDTS DEM

SDTS DEMs are downloaded in compressed .tar.gz format.  The filename of the compressed file must end in “.tar.gz”.  Some browsers will change the file extension on download to “_tar.gz”.  In this case, you must manually correct the filename to correctly decompress the SDTS file.  Also, if you use Winzip to decompress these files, you MUST disable "TAR File Smart CR/LF Conversion" in "Options - Configuration." Otherwise, the decompressed file will have added bytes and will not be readable by 3DEM.  Correct decompression by Winzip will result in 18 files with a “.ddf” filename extension.  Choose “File - Load Terrain - Digital Model,” choose “USGS SDTS DEM” and select any one of the 18 .ddf files.  3DEM will then find all of the other necessary files and convert them into a standard DEM.

 FAILURE TO LOAD GTOPO30 DEM

The GTOPO30 DEMs are downloaded in compressed .tar.z format.  If you use Winzip to decompress these files, you MUST disable "TAR File Smart CR/LF Conversion" in "Options - Configuration." Otherwise, the decompressed file will have added bytes and will not be readable by 3DEM.  The usual symptom of this problem is an “Improper Rows or Columns” message when loading a GTOPO30 DEM.


POOR SCENE COMPOSITION
 COMMON PROBLEMS (Continued)

SCRAMBLED OR MISSING TERRAIN OVERLAY

Loading a surface overlay or map overlay on the terrain surface requires as much as 100 Mbytes of free hard drive disk space.  3DEM creates large temporary files in the same file directory as the overlay file that you choose.  If drive space is not available, or if these temporary files cannot be created, the surface may either show no overlay at all, or the overlay may consist of a scrambled image.

LOADING OVERLAYS TAKES A VERY LONG TIME

The time to load and resize large overlays (such as cropped DRG TIF files) may be lengthy (10 minutes or more) depending on the speed of your computer, and this is normal for 3DEM.  Note that if you have access to high performance graphics tools, such as PhotoShop, this resizing might be accomplished more quickly using one of these external programs.  Just resize the overlay image to a maximum width of about 3600 pixels.  However, it isn’t necessary to invest in other expensive graphics tools if you have the patience to wait somewhat longer for 3DEM to perform the task.  Resizing must only be done once for each overlay file, and the resulting resized bitmap will be saved for subsequent use.

DIGITAL RASTER GRAPHIC OVERLAYS DON’T MATCH

To use DRGs as overlays, you must have a DRG created for the same UTM grid and map Datum as the underlying DEM.  You can read the characteristics of the DEM by selecting “File - Show DEM Specs” from the Overhead View menu.  The DRG map chosen as an overlay should match the Coordinate Type (Grid) and Datum shown here.  DEM and DRG maps that obviously tilt in different directions are an indication of a mismatch due to different UTM grids.  Note that the California DEMs available on the Internet are mostly all referenced to the California State UTM Grid rather than the United States UTM Grid, so frequently there will be a mismatch between the DEM and DRG overlay for areas of California.  The California State Grid DRGs can be used with 3DEM, but they must be rotated to match the orientation of the DEM using an external program such as PhotoShop.  The California DRGs available in the online 3DEM library have been rotated in this manner (see http://www.microtopo.com/library.html ).

DIGITAL ORTHOPHOTO QUAD OVERLAYS DON’T MATCH

The “preview” USGS DOQs available at http://edcwww.cr.usgs.gov/Webglis/glisbin/search.pl?DOQ_QQUAD make excellent terrain overlays.  Note however that the corner coordinates given on the USGS web page for each quad are only approximate.  Using these coordinates for geo-referencing will result in a noticeable overlay mismatch.  You can solve this by using the coordinates of known landmarks for geo-referencing, or by using the Adjust Overlay Position function once the 3D scene has been created.

MEMORY USAGE

3DEM requires a large amount of memory, particularly if you are working with large overlay overlays.  The program will run with only 128 Mbytes of memory, but will require a great deal of patience.  128 Mbytes is a practical lower limit, but 256 Mbytes is recommended.

When memory is in short supply, Windows programs will attempt to use the hard drive as virtual memory.  When this happens to 3DEM, speed of operation becomes very slow.  The best remedy for this situation is to take action to reduce the memory shortfall.  This includes closing other running programs, choosing smaller sized maps, and of course installing more memory.


CREDITS

The following organizations or persons have provided free software via the Internet, which has greatly contributed to the capabilities of the 3DEM program.

Mr. Sol Katz provided the SDTS to DEM conversion code and contributed the large library of useful GIS utilities at ftp://ftp.blm.gov/pub/gis/sdts/dem.

The code for conversion between UTM and Latitude-Longitude was developed by Mr. Chuck Gantz and is available at http://www.gpsy.com/gpsinfo/geotoutm/.

Graphics format conversion and animation are provided by the Multimedia Conversion Library by Robert Tibljas and Zeljko Nikolic, available at http://www.gromada.com/index.html.

The global terrain image used in the Coordinate Selection dialog box for GTOPO30 and GLOBE DEMs was derived from GLOBE Documentation (ver 1.0).

Hastings, David A., and Paula K. Dunbar, 1999. Global Land One-kilometer Base Elevation (GLOBE) Digital Elevation Model, Documentation, Version 1.0. Key to Geophysical Records Documentation (KGRD) 34. National Oceanic and Atmospheric Administration, National Geophysical Data Center, 325 Broadway, Boulder, Colorado 80303, U.S.A.